.class public Lcom/waiqin365/lightapp/im/activity/GroupsActivity;
.super Lcom/waiqin365/lightapp/im/activity/IMBaseActivity;

# interfaces
.implements Landroid/view/View$OnClickListener;


# static fields
.field public static b:Lcom/waiqin365/lightapp/im/activity/GroupsActivity;


# instance fields
.field protected a:Ljava/util/List;

.field public c:Lcom/waiqin365/base/login/mainview/TitleBar;

.field private d:Landroid/widget/ListView;

.field private e:Lcom/waiqin365/lightapp/im/adapter/av;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/IMBaseActivity;-><init>()V

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/im/activity/GroupsActivity;)Lcom/waiqin365/lightapp/im/adapter/av;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->e:Lcom/waiqin365/lightapp/im/adapter/av;

    return-object v0
.end method


# virtual methods
.method public back(Landroid/view/View;)V
    .locals 2

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->finish()V

    const v0, 0x7f040020

    const v1, 0x7f040023

    invoke-virtual {p0, v0, v1}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->overridePendingTransition(II)V

    return-void
.end method

.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 1

    invoke-super {p0, p1, p2, p3}, Lcom/waiqin365/lightapp/im/activity/IMBaseActivity;->onActivityResult(IILandroid/content/Intent;)V

    const/4 v0, -0x1

    if-ne p2, v0, :cond_0

    packed-switch p1, :pswitch_data_0

    :cond_0
    :goto_0
    return-void

    :pswitch_0
    invoke-virtual {p0, p2}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->setResult(I)V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->finish()V

    goto :goto_0

    nop

    :pswitch_data_0
    .packed-switch 0x6c
        :pswitch_0
    .end packed-switch
.end method

.method public onBackPressed()V
    .locals 2

    invoke-super {p0}, Lcom/waiqin365/lightapp/im/activity/IMBaseActivity;->onBackPressed()V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->finish()V

    const v0, 0x7f040020

    const v1, 0x7f040023

    invoke-virtual {p0, v0, v1}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->overridePendingTransition(II)V

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    return-void

    :pswitch_0
    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->finish()V

    goto :goto_0

    :pswitch_data_0
    .packed-switch 0x7f0c008a
        :pswitch_0
    .end packed-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3

    const/16 v2, 0x8

    invoke-super {p0, p1}, Lcom/waiqin365/lightapp/im/activity/IMBaseActivity;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f030160

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->setContentView(I)V

    sput-object p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->b:Lcom/waiqin365/lightapp/im/activity/GroupsActivity;

    const v0, 0x7f0c07d4

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/login/mainview/TitleBar;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->c:Lcom/waiqin365/base/login/mainview/TitleBar;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->c:Lcom/waiqin365/base/login/mainview/TitleBar;

    iget-object v0, v0, Lcom/waiqin365/base/login/mainview/TitleBar;->e:Landroid/widget/TextView;

    const v1, 0x7f080738

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->c:Lcom/waiqin365/base/login/mainview/TitleBar;

    iget-object v0, v0, Lcom/waiqin365/base/login/mainview/TitleBar;->a:Landroid/widget/ImageButton;

    invoke-virtual {v0, p0}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->c:Lcom/waiqin365/base/login/mainview/TitleBar;

    iget-object v0, v0, Lcom/waiqin365/base/login/mainview/TitleBar;->h:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->c:Lcom/waiqin365/base/login/mainview/TitleBar;

    iget-object v0, v0, Lcom/waiqin365/base/login/mainview/TitleBar;->i:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->groupManager()Lcom/hyphenate/chat/EMGroupManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMGroupManager;->getAllGroups()Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->a:Ljava/util/List;

    const v0, 0x7f0c0201

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->d:Landroid/widget/ListView;

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/av;

    const/4 v1, 0x1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->a:Ljava/util/List;

    invoke-direct {v0, p0, v1, v2}, Lcom/waiqin365/lightapp/im/adapter/av;-><init>(Landroid/content/Context;ILjava/util/List;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->e:Lcom/waiqin365/lightapp/im/adapter/av;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->d:Landroid/widget/ListView;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->e:Lcom/waiqin365/lightapp/im/adapter/av;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->d:Landroid/widget/ListView;

    new-instance v1, Lcom/waiqin365/lightapp/im/activity/cw;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/activity/cw;-><init>(Lcom/waiqin365/lightapp/im/activity/GroupsActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    return-void
.end method

.method protected onDestroy()V
    .locals 1

    invoke-super {p0}, Lcom/waiqin365/lightapp/im/activity/IMBaseActivity;->onDestroy()V

    const/4 v0, 0x0

    sput-object v0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->b:Lcom/waiqin365/lightapp/im/activity/GroupsActivity;

    return-void
.end method

.method public onResume()V
    .locals 3

    invoke-super {p0}, Lcom/waiqin365/lightapp/im/activity/IMBaseActivity;->onResume()V

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->groupManager()Lcom/hyphenate/chat/EMGroupManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMGroupManager;->getAllGroups()Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->a:Ljava/util/List;

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/av;

    const/4 v1, 0x1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->a:Ljava/util/List;

    invoke-direct {v0, p0, v1, v2}, Lcom/waiqin365/lightapp/im/adapter/av;-><init>(Landroid/content/Context;ILjava/util/List;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->e:Lcom/waiqin365/lightapp/im/adapter/av;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->d:Landroid/widget/ListView;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->e:Lcom/waiqin365/lightapp/im/adapter/av;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/GroupsActivity;->e:Lcom/waiqin365/lightapp/im/adapter/av;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/adapter/av;->notifyDataSetChanged()V

    return-void
.end method
